eea244c479703d1105751196d4fd97cf6476f9bd,src/edu/stanford/nlp/sentiment/SentimentModel.java,SentimentModel,SentimentModel,#RNNOptions#TwoDimensionalSet#Set#,86
Before Change
this.op = op;
rand = (op.randomSeed != 0) ? new Random(op.randomSeed) : new Random();
readWordVectors();
if (op.numHid > 0) {
this.numHid = op.numHid;
} else {
After Change
// TODO: record for posterity the random seed if it was set to 0
rand = (op.randomSeed != 0) ? new Random(op.randomSeed) : new Random();
if (op.randomWordVectors) {
initRandomWordVectors(trainingTrees);
} else {
readWordVectors();
}
if (op.numHid > 0) {
this.numHid = op.numHid;
} else {
int size = 0;
for (SimpleMatrix vector : wordVectors.values()) {
size = vector.getNumElements();
break;
}
this.numHid = size;
}
TwoDimensionalSet<String, String> binaryProductions = TwoDimensionalSet.hashSet();
if (op.simplifiedModel) {
binaryProductions.add("", "");
} else {
// TODO
// figure out what binary productions we have in these trees
// Note: the current sentiment training data does not actually
// have any constituent labels
}
Set<String> unaryProductions = Generics.newHashSet();
if (op.simplifiedModel) {
unaryProductions.add("");
} else {
// TODO
// figure out what unary productions we have in these trees (preterminals only, after the collapsing)